-- GENERATED SPELL FOR [Enraged Tempest] --


function spell0_25415(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(50420,pUnit)
pUnit:RegisterEvent('Sorts_25415', 620, 1)
end

function spell1_25415(pUnit, Event) --@Zephyr,n/a--
pUnit:FullCastSpellOnTarget(50215,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25415', 15000, 1)
end

function Sorts_25415(pUnit, Event)
local choix_sorts_25415 = math.random(0, 1)
if choix_sorts_25415 == 0 then
pUnit:RegisterEvent('spell0_25415', 1, 1)
end
if choix_sorts_25415 == 1 then
pUnit:RegisterEvent('spell1_25415', 1, 1)
end
end

function mob25415_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25415', math.random(1500, 3000), 1)
end

function mob25415_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25415_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25415_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25415, 1, 'mob25415_Action')
RegisterUnitEvent(25415, 2, 'mob25415_Leave')
RegisterUnitEvent(25415, 3, 'mob25415_Kill')
RegisterUnitEvent(25415, 4, 'mob25415_Die')
